<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>JSON</title>
	</head>
	<body>
		<h1>JSON对象创建</h1>
		<script>
			person={
				name:'Jack',
				age:20,
				addr:{
					homeAddr:'太原小店区',
					workAddr:'太原迎泽区'
				}
			};
			alert(person.name);
			alert(person.addr.homeAddr),
			alert(person["age"]);//这里单双引号都可以
			students=[
			{
				name:'wzj',
			    age:43
			},
			{
				name:'wanglaoshi',
				age:28
			}
			];
			alert(students[1].age);
			s={
	              "sites": [
                   { "name":"菜鸟教程" , "url":"www.runoob.com" }, 
                    { "name":"google" , "url":"www.google.com" }, 
                  { "name":"微博" , "url":"www.weibo.com" }
         ]
			}
		</script>
	</body>
</html>
